/*
 *      misc.h
 *      
 *      Copyright 2009 Daniele Ricci <denn86@gmail.com>, Luca Saccagi <luksak86@gmail.com>
 *      
 *      This program is free software; you can redistribute it and/or modify
 *      it under the terms of the GNU General Public License as published by
 *      the Free Software Foundation; either version 2 of the License, or
 *      (at your option) any later version.
 *      
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *      
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *      MA 02110-1301, USA.
 */

#ifndef _MISC
#define _MISC

#include "idmp.h"

void version(int argc, char **argv);

#ifdef _WIN32 //Static attribute needed in function declaration under VS2005
AlertList *idmp_init(AlertList *top);
void idmp_dir_polling(AlertList *top);
char *strtoupr(char *str);
void init_executing_func(void);
executing_func *push_func(char pattern[3],xmlNodeList *(*func)(processingTree *this,stringList *sel,VortexConnection *cn,VortexChannel *ch),int (*parse)(processingTree *this,char *where,int index,int i),void(*delf)(AlertList *to_delete));
void remove_xmlnode(xmlNodePtr td);
void idmp_window(AlertList *top, int *timer);

void nxmlFreeDtd(xmlDtdPtr cur);
void nxmlFreeNsList(xmlNsPtr cur);
void nxmlFreeNs(xmlNsPtr cur);
void nxmlFreeNodeList(xmlNodePtr cur);
void nxmlFreeProp(xmlAttrPtr cur);
void nxmlFreePropList(xmlAttrPtr cur);
void nxmlFreeNode(xmlNodePtr cur);
void nxmlFreeDoc(xmlDocPtr cur);

#else //Other OS declarations 
AlertList *idmp_init(AlertList *top);
void idmp_dir_polling(AlertList *top);
inline char *strtoupr(char *str);
void init_executing_func(void);
inline executing_func *push_func(char pattern[3],xmlNodeList *(*func)(processingTree *this,stringList *sel,VortexConnection *cn,VortexChannel *ch),int (*parse)(processingTree *this,char *where,int index,int i),void(*delf)(AlertList *to_delete));
void remove_xmlnode(xmlNodePtr td);
void idmp_window(AlertList *top, int *timer);

void nxmlFreeDtd(xmlDtdPtr cur);
void nxmlFreeNsList(xmlNsPtr cur);
void nxmlFreeNs(xmlNsPtr cur);
void nxmlFreeNodeList(xmlNodePtr cur);
void nxmlFreeProp(xmlAttrPtr cur);
void nxmlFreePropList(xmlAttrPtr cur);
void nxmlFreeNode(xmlNodePtr cur);
void nxmlFreeDoc(xmlDocPtr cur);
#endif

#endif
